package scene;

import gui.Box;
import gui.MenuManager;
import input.InputManager;
import main.Core;
import model.GameObject;

/**
 * @author Ygor
 *
 */
public class BaseScene extends GameObject{

	private MenuManager menuManager;
	
	public BaseScene(Core core) {
		super(null, core);
		menuManager = new MenuManager();
	}

	public void start()
	{
		this.initialize();
	}
	
	@Override
	public void update(float elapsedTime) {
		if (InputManager.keyboard.getExit().isPressed()) {
			getCore().changeScene(null);
		}
		super.update(elapsedTime);
	}

	public Box getActualBox() {
		return menuManager.top();
	}

	public void addMenu(Box box) {
		menuManager.addMenu(box);
	}
	
	public void removeMenu(){
		menuManager.removeMenu();
	}

	public MenuManager getMenuManager() {
		return menuManager;
	}

	public void setMenuManager(MenuManager menuManager) {
		this.menuManager = menuManager;
	}
	
}
